package com.nova.edc.model.system;

import com.nova.frame.annotation.Id;
import com.nova.frame.annotation.Join;
import com.nova.frame.annotation.Table;
import com.nova.frame.annotation.Transient;
import com.nova.module.filter.annotation.FilterCondition;

@Table("t_collectarea_item")
public class CollectAreaItem implements Comparable<CollectAreaItem> {

    @Id
    private Integer id;
    private Integer headid;
    @Join(fieldName = "headid", table = CollectArea.class, joinColumn = "GatewayID")
    @FilterCondition
    private String gatewayid;
    @Join(fieldName = "headid", table = CollectArea.class, joinColumn = "SensorID")
    @FilterCondition
    private Integer sensorid;
    @Join(fieldName = "headid", table = CollectArea.class, joinColumn = "ChannelID")
    @FilterCondition
    private Integer channelid;
    @Join(fieldName = "headid", table = CollectArea.class, joinColumn = "CollectAreaName")
    private String collectareaname;
    private Integer tralightid;
    @Transient
    @Join(fieldName = "tralightid", table = DeviceLight.class, joinColumn = "LightCode")
    private String tralightCode;
    @Join(fieldName = "tralightid", table = DeviceLight.class, joinColumn = "LightName")
    private String tralightName;
    @Join(fieldName = "tralightid", table = DeviceLight.class, joinColumn = "Power")
    private Integer tralightPower;
    private Integer tranum;
    private Integer ledlightid;
    @Transient
    @Join(fieldName = "ledlightid", table = DeviceLight.class, joinColumn = "LightCode")
    private String ledlightCode;
    @Join(fieldName = "ledlightid", table = DeviceLight.class, joinColumn = "LightName")
    private String ledlightName;
    @Join(fieldName = "ledlightid", table = DeviceLight.class, joinColumn = "Power")
    private Integer ledlightPower;
    private Integer lednum;
    @FilterCondition()
    private Integer companycode;
    private Integer customerinfoid;
    @Transient
    private Double userhour;
    @Transient
    private Integer useminute;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getHeadid() {
        return headid;
    }

    public void setHeadid(Integer headid) {
        this.headid = headid;
    }

    public Integer getTralightid() {
        return tralightid;
    }

    public void setTralightid(Integer tralightid) {
        this.tralightid = tralightid;
    }

    public Integer getTranum() {
        return tranum;
    }

    public void setTranum(Integer tranum) {
        this.tranum = tranum;
    }

    public Integer getLedlightid() {
        return ledlightid;
    }

    public void setLedlightid(Integer ledlightid) {
        this.ledlightid = ledlightid;
    }

    public Integer getLednum() {
        return lednum;
    }

    public void setLednum(Integer lednum) {
        this.lednum = lednum;
    }

    public String getTralightCode() {
        return tralightCode;
    }

    public void setTralightCode(String tralightCode) {
        this.tralightCode = tralightCode;
    }

    public String getLedlightCode() {
        return ledlightCode;
    }

    public void setLedlightCode(String ledlightCode) {
        this.ledlightCode = ledlightCode;
    }

    public Integer getCompanycode() {
        return companycode;
    }

    public void setCompanycode(Integer companycode) {
        this.companycode = companycode;
    }

    public Integer getCustomerinfoid() {
        return customerinfoid;
    }

    public void setCustomerinfoid(Integer customerinfoid) {
        this.customerinfoid = customerinfoid;
    }

    public String getTralightName() {
        return tralightName;
    }

    public void setTralightName(String tralightName) {
        this.tralightName = tralightName;
    }

    public Integer getTralightPower() {
        return tralightPower;
    }

    public void setTralightPower(Integer tralightPower) {
        this.tralightPower = tralightPower;
    }

    public String getLedlightName() {
        return ledlightName;
    }

    public void setLedlightName(String ledlightName) {
        this.ledlightName = ledlightName;
    }

    public Integer getLedlightPower() {
        return ledlightPower;
    }

    public void setLedlightPower(Integer ledlightPower) {
        this.ledlightPower = ledlightPower;
    }

    public String getGatewayid() {
        return gatewayid;
    }

    public void setGatewayid(String gatewayid) {
        this.gatewayid = gatewayid;
    }

    public Integer getSensorid() {
        return sensorid;
    }

    public void setSensorid(Integer sensorid) {
        this.sensorid = sensorid;
    }

    public Integer getChannelid() {
        return channelid;
    }

    public void setChannelid(Integer channelid) {
        this.channelid = channelid;
    }

    public String getCollectareaname() {
        return collectareaname;
    }

    public void setCollectareaname(String collectareaname) {
        this.collectareaname = collectareaname;
    }

    public Double getUserhour() {
        return userhour;
    }

    public void setUserhour(Double userhour) {
        this.userhour = userhour;
    }

    public Integer getUseminute() {
        return useminute;
    }

    public void setUseminute(Integer useminute) {
        this.useminute = useminute;
    }

    @Override
    public int compareTo(CollectAreaItem o) {
        return this.useminute.compareTo(o.getUseminute());
    }
}
